package com.junmeng.jdemo.recycler.bindview;

import android.util.Log;
import android.view.View;

import com.example.common.recycler.common.BaseCommonBindView;
import com.example.common.recycler.common.RecyclerViewHolder;
import com.junmeng.jdemo.R;
import com.junmeng.jdemo.recycler.bean.Bean1;

public class Bean1CommonBindView extends BaseCommonBindView<Bean1> {
    private static final String TAG = "Bean1BindView";

    @Override
    public void bindViewDataWithFull(RecyclerViewHolder holder, int position, Bean1 item) {
        holder.setOnClickListener(R.id.btn_test, new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Log.i(TAG, "on click position=" + position);
            }
        });
        holder.setOnLongClickListener(R.id.btn_test, new View.OnLongClickListener() {
            @Override
            public boolean onLongClick(View v) {
                Log.i(TAG, "on long click position=" + position);
                return true;
            }
        });
    }

    @Override
    public int getItemLayoutResId(Bean1 bean1) {
        return R.layout.item_bean_1;
    }
}
